import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JPanel;
class Ajout extends JFrame implements ActionListener {
Graphe g;
JButton choix,choix2;
	 Ajout(Graphe g,String s) {
		this.g=g;
		choix = new JButton("Utilisateur");
		choix2 = new JButton("Page");
		
		setLayout(new FlowLayout());
		add(choix);
		add(choix2);
		choix.addActionListener(this);
		choix2.addActionListener(this);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 
		setLocationRelativeTo(null);
		setVisible(true);
		pack();
	 }
	 

	@Override
	public void actionPerformed(ActionEvent e) {
		 Object source = e.getSource();
			if(source == choix){ 
				Dialogue2 dialogue=new Dialogue2(g);
				this.setVisible(false);
				
			}else{
				Dialogue dialogue=new Dialogue(g);
				this.setVisible(false);
			}
		
	}
	}
